﻿@model IEnumerable<Inspinia_MVC5.Models.Worker>

@{
    ViewBag.Title = "Index";
}

<div class="row wrapper border-bottom white-bg page-heading">
    <div class="col-sm-4">
        <h2>Scaffolding Example</h2>
        <ol class="breadcrumb">
            <li class="active">
                <strong>Worker</strong>
            </li>
        </ol>
    </div>
</div>


<div class="wrapper wrapper-content animated fadeInRight">

    <div class="row">
        <div class="col-lg-12">
            <div class="alert text-center">
                <p>
                    Table below was generated by Entity Framework using custom template - customized to INSPINIA theme. All pages (list, details, create, delete) was customized to give you ability for rapid development with Entity Framework. All Templates are located in CodeTemplates folder under Project.
                    <strong>See documentation for tutorial how to create basic CRUD functionality with the Entity Framework and INSPINIA templates.</strong>
                </p>
            </div>
        </div>
    </div>

    <div class="row">
        <div class="col-lg-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>List of Worker</h5>
                    <div class="ibox-tools">
                        @Html.ActionLink("Create New", "Create", null, new { @class = "btn btn-primary btn-xs" })
                    </div>
                </div>
                <div class="ibox-content">

                    <table class="table table-striped">
                        <tr>
                            <th>
                                @Html.DisplayNameFor(model => model.Name)
                            </th>
                            <th>
                                @Html.DisplayNameFor(model => model.Position)
                            </th>
                            <th>
                                @Html.DisplayNameFor(model => model.Office)
                            </th>
                            <th>
                                @Html.DisplayNameFor(model => model.Extn)
                            </th>
                            <th>
                                @Html.DisplayNameFor(model => model.Salary)
                            </th>
                            <th></th>
                        </tr>

                        @foreach (var item in Model)
                        {
                            <tr>
                                <td>
                                    @Html.DisplayFor(modelItem => item.Name)
                                </td>
                                <td>
                                    @Html.DisplayFor(modelItem => item.Position)
                                </td>
                                <td>
                                    @Html.DisplayFor(modelItem => item.Office)
                                </td>
                                <td>
                                    @Html.DisplayFor(modelItem => item.Extn)
                                </td>
                                <td>
                                    @Html.DisplayFor(modelItem => item.Salary)
                                </td>
                                <td>
                                    @Html.ActionLink("Details", "Details", new { id = item.ID }, new { @class = "btn btn-primary btn-sm" })
                                    @Html.ActionLink("Edit", "Edit", new { id = item.ID }, new { @class = "btn btn-white btn-sm" })
                                    @Html.ActionLink("Delete", "Delete", new { id = item.ID }, new { @class = "btn btn-white btn-sm" })
                                </td>
                            </tr>
                        }

                    </table>

                </div>
            </div>
        </div>
    </div>
</div>
